﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Atomic
{
    /// <summary>
    /// A function that can process a connection. 定义一个用于处理由Socket.AcceptAsync()生的新连接委托。
    /// </summary>
    /// <param name="connection">A <see cref="ConnectionContext" /> representing the connection.</param>
    /// <returns>A <see cref="Task"/> that represents the connection lifetime. When the task completes, the connection will be closed.</returns>
    public delegate Task ConnectionDelegate(ConnectionContext connection);
}
